﻿using System;

namespace ListCreator
{
    internal class ListProcessingEventArgs : EventArgs
    {
        public int RecordCount { get; set; }

        private int processedCount;
        public int ProcessedCount
        {
            get { return processedCount; }
            set { processedCount = value; OnProcessedCountChanged(null, null); }
        }

        private static event EventHandler processedCountChanged;
        public static event EventHandler ProcessedCountChanged
        {
            add { processedCountChanged += value; }
            remove { processedCountChanged -= value; }
        }

        public static void OnProcessedCountChanged(object sender, EventArgs e)
        {
            if (processedCountChanged != null)
                processedCountChanged(sender, e);
        }
    }
}
